package cn.com.ejiakanghu.vo;

import cn.com.ejiakanghu.dto.UserCashoutBankDto;
import org.linlinjava.litemall.db.domain.AgedmallPromoteWithdrawalRecord;
import org.linlinjava.litemall.db.domain.AgedmallUserCashout;
import org.linlinjava.litemall.db.util.DateUtil;

import java.math.BigDecimal;

public class CashoutDetailListVo {
    private Integer id;
    private String tradeId;
    private BigDecimal money;
    private String status;
    private String channel;
    private String bankName;
    private String bankCardId;
    private String reqTime;
    private String respTime;
    private String errorInfo;

    public CashoutDetailListVo() {
    }

    public CashoutDetailListVo(AgedmallUserCashout agedmallUserCashout, UserCashoutBankDto userCashoutBankDto) {
        this.id = agedmallUserCashout.getId();
        this.tradeId = agedmallUserCashout.getTradeId();
        this.money = agedmallUserCashout.getMoney();
        this.status = agedmallUserCashout.getStatus();
        this.channel = agedmallUserCashout.getChannel();
        this.bankName = null == userCashoutBankDto ? null : userCashoutBankDto.getName();
        this.bankCardId = null == userCashoutBankDto ? null : userCashoutBankDto.getCardId();
        this.reqTime = null == agedmallUserCashout.getAddTime() ? null : agedmallUserCashout.getAddTime().format(DateUtil.DATE_TIME_FORMATTER);
        this.respTime = null == agedmallUserCashout.getRespTime() ? null : agedmallUserCashout.getRespTime().format(DateUtil.DATE_TIME_FORMATTER);
        this.errorInfo = agedmallUserCashout.getErrorinfo();
    }

    public CashoutDetailListVo(AgedmallPromoteWithdrawalRecord withdrawalRecord, UserCashoutBankDto userCashoutBankDto) {
        this.id = withdrawalRecord.getId();
        this.tradeId = withdrawalRecord.getWithdrawalNumber();
        this.money = withdrawalRecord.getMoney();
        this.status = withdrawalRecord.getWithdrawalStatus();
        this.channel = withdrawalRecord.getWithdrawalType();
        this.bankName = null == userCashoutBankDto ? null : userCashoutBankDto.getName();
        this.bankCardId = null == userCashoutBankDto ? null : userCashoutBankDto.getCardId();
        this.reqTime = null == withdrawalRecord.getWithdrawalTime() ? null : withdrawalRecord.getWithdrawalTime().format(DateUtil.DATE_TIME_FORMATTER);
        this.respTime = null == withdrawalRecord.getResptime() ? null : withdrawalRecord.getResptime().format(DateUtil.DATE_TIME_FORMATTER);
        this.errorInfo = withdrawalRecord.getErrorinfo();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTradeId() {
        return tradeId;
    }

    public void setTradeId(String tradeId) {
        this.tradeId = tradeId;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getBankName() {
        return bankName;
    }

    public void setBankName(String bankName) {
        this.bankName = bankName;
    }

    public String getBankCardId() {
        return bankCardId;
    }

    public void setBankCardId(String bankCardId) {
        this.bankCardId = bankCardId;
    }

    public String getReqTime() {
        return reqTime;
    }

    public void setReqTime(String reqTime) {
        this.reqTime = reqTime;
    }

    public String getRespTime() {
        return respTime;
    }

    public void setRespTime(String respTime) {
        this.respTime = respTime;
    }

    public String getErrorInfo() {
        return errorInfo;
    }

    public void setErrorInfo(String errorInfo) {
        this.errorInfo = errorInfo;
    }
}
